set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO

If exists(select 1 from sysobjects where xtype = 'P' and name = 'Empresa_Delete')
Begin
   Drop proc [Empresa_Delete]
End


GO
CREATE     Proc [dbo].[Empresa_Delete]
	(@Emp_Id smallint) AS
Begin
	Set nocount on

	begin tran
	Delete From Precio Where Emp_Id = @Emp_Id
	Delete From Empresa Where Emp_Id = @Emp_Id

	if @@error <> 0 
		rollback tran
	else
		commit tran
	Set nocount on
End

GO




 